package com.fy.service.imbusiness.controller;


import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fy.framework.common.model.R;
import com.fy.common.dto.UserRegisterAndLoginDto;
import com.fy.service.imbusiness.service.RegisterAndLoginService;

import lombok.AllArgsConstructor;

/**
 * 登录
 *
 * @author zhshuo
 * @date 2021/11/29 15:15
 **/
@Deprecated
@RestController
@AllArgsConstructor
// @Api(tags="用户登录")
@RequestMapping("/token")
public class TokenController {

    RegisterAndLoginService registerAndLoginService;

    @PostMapping
    // @ApiOperation("用户登录")
    public R<?> token(@RequestBody UserRegisterAndLoginDto registerAndLoginDto) {
        return registerAndLoginService.token(registerAndLoginDto);
    }
}
